#include <func.h>

int main(int argc,char *argv[])
{
    ARGS_CHECK(argc,2);
    printf("打印用户信息euid=%d egid=%d\n",geteuid(),getegid());
    int fd=open(argv[1],O_RDWR);
    write(fd,"helloworld",10);
    char buf[4096];
    lseek(fd,0,SEEK_SET);
    read(fd,buf,sizeof(buf));
    printf("buf=%s\n",buf);
    close(fd);
    return 0;
}

